An electronic device, such as a computer, smart phone, or a consumer device, includes an input and output interface for data exchange with a peripheral device. The electronic device can also charge the peripheral device through the input and output interface.